import {createRouter, createWebHistory} from 'vue-router'
import Home from '@/views/HomeView.vue'
import Life from "@/views/LifeView.vue"
import Write from "@/views/WriteArticleView.vue"
import Index from "@/views/index.vue";
import Login from '@/views/Login.vue'
import WritesInfo from '@/views/WritesInfo.vue'


const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes: [
        {
            id: "login",
            path: '/',
            name: "login",
            component: Login
        },
        {
            id: "index",
            path: '/index',
            name: 'index',
            component: Index,
            children: [
                {
                    id: "home",
                    path: 'home/:status',
                    name: 'home',
                    component: Home,
                },
                {
                    id: "Life",
                    path: 'life/:status',
                    name: 'life',
                    component: Life
                },
                {
                    id: "Write",
                    path: 'write',
                    name: 'Write',
                    component: Write
                },

                {
                    id: "WritesInfo",
                    path: 'writes/:uuid',
                    name: 'WritesInfo',
                    component: WritesInfo,

                }
            ]
        },
    ]
})

export default router
